package com.example.mqrabbit.myspring.test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
/**
 * 功能概要：消费接收
 *
 * @author linbingwen
 * @since 2016年1月15日
 */
public class MessageConsumer implements MessageListener {
    private Logger logger = LoggerFactory.getLogger(MessageConsumer.class);
    private AmqpTemplate amqpTemplate;

    @Override
    public void onMessage(Message message) {
//        ("receive message:{}",message);
//        amqpTemplate.receiveAndConvert(message.toString());
        logger.info("consumer receive message------->:{}", message);

    }
}